﻿<!DOCTYPE html>
<html>
<!-- 安全检查记录 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="/static/js/common.js"></script>

</head>

<body>

    <div id="app" v-cloak>
        <el-form label-position="right" ref="form" :inline="true" :model="formInline" class="demo-form-inline"
                 style="margin-bottom: 15px;">
            <el-row>
                <el-col class="head-tool">

                    <div class="new_title fl"><strong><img src="/static/images/icon1.png" />安全检查记录列表</strong></div>
                    <span>
                        <btn :text="col.btnSelect" imgsrc="/static/images/search.png" linetype="3" @click="onSubmit">
                        </btn>
                        
                    </span>
                </el-col>
            </el-row>
            <el-row class="popupW100">
                <!--隐患描述-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.describe" :placeholder="SafeCheckManagement.describe"
                                      size="mini">
                                <template slot="prepend">
                                    {{SafeCheckManagement.describe+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <!--隐患类别-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{SafeCheckManagement.hiddenTroubleClass+mark.m}}
                                </template>
                                <el-select @visible-change="visibleChange" v-model="formInline.model.hiddenTroubleClass" slot="suffix">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option v-for="item in hiddenTroubleClassL" :label="item.value"
                                               :value="item.key">
                                    </el-option>
                                </el-select>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <!--行动负责人-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.headOperations"
                                      :placeholder="SafeCheckManagement.headOperations" size="mini">
                                <template slot="prepend">
                                    {{SafeCheckManagement.headOperations+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <!--是否完成-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{SafeCheckManagement.YNFinish+mark.m}}
                                </template>
                                <el-select @visible-change="visibleChange" v-model="formInline.model.YNFinish" slot="suffix">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option v-for="item in YNFinishL" :label="item.value" :value="item.key">
                                    </el-option>
                                </el-select>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <!--报告时间开始-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <el-form-item>
                        <div class="elst-select-mini">
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{SafeCheckManagement.reportDateStart+mark.m}}
                                </template>
                                <el-date-picker slot="suffix" v-model="formInline.model.reportDateStart" type="date" size="mini"
                                                format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择时间">
                                </el-date-picker>
                            </el-input>
                        </div>
                    </el-form-item>
                </el-col>
                <!--报告时间结束-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <el-form-item>
                        <div class="elst-select-mini">
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{SafeCheckManagement.reportDateEnd+mark.m}}
                                </template>
                                <el-date-picker slot="suffix" v-model="formInline.model.reportDateEnd" type="date" size="mini"
                                                format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择时间">
                                </el-date-picker>
                            </el-input>
                        </div>
                    </el-form-item>
                </el-col>




            </el-row>


        </el-form>
        <el-table ref="table" stripe :data="ListItem.tableData" :row-key="getRowKeys" :height="ListItem.tableHeight"
                  border @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%;">
            <el-table-column type="selection" style="
            padding-top: 0px;
            padding-bottom: 0px;
        " align="center" width="55" :reserve-selection="true">
            </el-table-column>
            <!--序号-->
            <el-table-column type="index" :label="col.SequenceNumber" :index="indexMethod" width="55"
                             show-overflow-tooltip="true"></el-table-column>
            <!--隐患描述-->
            <el-table-column prop="describe" :label="SafeCheckManagement.describe" min-width="200" show-overflow-tooltip="true">
            </el-table-column>
            <!--隐患类别-->
            <el-table-column prop="hiddenTroubleClassText" :label="SafeCheckManagement.hiddenTroubleClass" min-width="150" show-overflow-tooltip="true">
            </el-table-column>
            <!--报告人-->
            <el-table-column prop="reportPerson" :label="SafeCheckManagement.reportPerson" min-width="100" show-overflow-tooltip="true">
            </el-table-column>
            <!--报告时间-->
            <el-table-column prop="reportDate" :label="SafeCheckManagement.reportDate" min-width="100" show-overflow-tooltip="true">
            </el-table-column>
            <!--整改行动-->
            <el-table-column prop="correctiveAction" :label="SafeCheckManagement.correctiveAction" min-width="150"
                             show-overflow-tooltip="true">
            </el-table-column>
            <!--行动负责人-->
            <el-table-column prop="headOperations" :label="SafeCheckManagement.headOperations" min-width="100" show-overflow-tooltip="true">
            </el-table-column>
            <!--预计完成时间-->
            <el-table-column prop="planDate" :label="SafeCheckManagement.planDate" min-width="120" show-overflow-tooltip="true">
            </el-table-column>
            <!--状态-->
            <el-table-column prop="stateText" :label="SafeCheckManagement.State" min-width="100" show-overflow-tooltip="true">
            </el-table-column>
            <!--是否完成-->
            <el-table-column prop="ynFinishText" :label="SafeCheckManagement.YNFinish" min-width="100" show-overflow-tooltip="true">
            </el-table-column>
            <!--是否公开-->
            <el-table-column prop="ynPublicText" :label="SafeCheckManagement.YNPublic" min-width="100" show-overflow-tooltip="true">
            </el-table-column>
            <el-table-column width="53" label="查看" fixed="right">
                <template slot-scope="scope">
                    <button type="button" class="elst-bt-xg" @click=UserInput('xg',scope.row.id)>
                        <i class="el-icon-edit"></i>
                    </button>
                </template>
            </el-table-column>

        </el-table>
        <el-row type="flex" justify="end">
            <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                           :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                           :layout="ListItem.layout" :total="ListItem.total">
            </el-pagination>
        </el-row>
        <!-- 弹出页 -->
        <el-dialog title="安全检查管理" fullscreen="true" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%"
                   top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                pageInitial: null,
                value1: "",
                //表单内容
                ListItem: ListItem,
                //获取下拉菜单hiddenTroubleClass
                hiddenTroubleClassL: [],
                YNFinishL: [],
                //页内数据初始化
                formInline: {
                    model: { reportDateStart: '', reportDateEnd: '' },
                    offset: 0,
                    limit: 10
                },
                Form: {}
            },
            created: function () {
                //var currApp = this;
                //window.onresize = function () {
                //    currApp.ListItem.tableHeight = window.innerHeight -
                //        currApp.$refs.table.$el.offsetTop - 60;
                //    if (currApp.ListItem.tableHeight < 112) {
                //        currApp.ListItem.tableHeight = 112;
                //    }
                //}
            },
            mounted: function () {
                ////初始化数据
                this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
                ////////////////////
                this.pageInitial = PageInitial(['zbyhlb', 'zbsfwc']);//隐患类别、是否完成
                var dicDataList = this.pageInitial.dataDicList;
                //隐患类别
                this.hiddenTroubleClassL = getDicDataFodDataList(dicDataList, 'zbyhlb');//总部_隐患类别
                this.YNFinishL = getDicDataFodDataList(dicDataList, 'zbsfwc'); //总部_是否完成
                //console.log("sssssss", this.YNFinishL);
                //获取下拉菜单内容
                //this.hiddenTroubleClassL = getDicData('zbyhlb'); //隐患类别
                //this.YNFinishL = getDicData('zbsfwc'); //是否完成
                //this.ConstructionCategory = getDicData('zbyhlbzt'); //总部_安全检查_状态
                //this.ConstructionCategory = getDicData('zbsfgk'); //总部_是否公开
                //this.ConstructionCategory = getDicData('zbsffstz'); //总部_是否发送通知
                ////////////////////
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                downLoadTemplate: function () {
                    this.$message({
                        message: '下载模版成功',
                        type: 'success'
                    });
                },
                publicDisplay: function () {
                    onDelete(this, '/api/ZB_SafetyCheck/PublicDisplay');
                    //this.$message({
                    //    message: '公开显示成功',
                    //    type: 'success'
                    //});
                },
                //关闭Dialog 回调
                closeDialog: function () { closeDialog(this); },
                //删除方法
                onDelete: function () { onDelete(this, '/api/ZB_SafetyCheck/DeleteMuti'); },
                //列表选择触发
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //Dialog展示
                UserInput: function (val, id) { DialogShow(this, val, "SafeCheckManagementShow.html", id); },
                //获取分页数据
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/ZB_SafetyCheck/GetListAll') },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },
                //获取下拉菜单数据
                getDropDown: function () {
                }

            }
        });
    </script>
</body>

</html>